package com.movie.dto;

import lombok.Data;
import lombok.RequiredArgsConstructor;

@Data
@RequiredArgsConstructor // 使用 final 字段生成构造函数
public class JwtResponse {
    private final String token; // JWT 令牌
    private String type = "Bearer"; // 令牌类型
    private Long id;
    private String username;
    private String email;
    private Integer role; // 将类型改为 Integer

    // 可以根据需要添加构造函数或 setter 来填充用户信息
    public JwtResponse(String token, Long id, String username, String email, Integer role) { // 修改构造函数参数类型
        this.token = token;
        this.id = id;
        this.username = username;
        this.email = email;
        this.role = role;
    }
} 